/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author wyr
 */
@Embeddable
public class NewsCatlogPlatformPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "mplatform")
    private String mplatform;
    @Basic(optional = false)
    @Column(name = "magent")
    private String magent;
    @Basic(optional = false)
    @Column(name = "mserialnum")
    private String mserialnum;
    @Basic(optional = false)
    @Column(name = "mlocale")
    private String mlocale;

    public NewsCatlogPlatformPK() {
    }

    public NewsCatlogPlatformPK(String mplatform, String magent, String mserialnum, String mlocale) {
        this.mplatform = mplatform;
        this.magent = magent;
        this.mserialnum = mserialnum;
        this.mlocale = mlocale;
    }

    public String getMplatform() {
        return mplatform;
    }

    public void setMplatform(String mplatform) {
        this.mplatform = mplatform;
    }

    public String getMagent() {
        return magent;
    }

    public void setMagent(String magent) {
        this.magent = magent;
    }

    public String getMserialnum() {
        return mserialnum;
    }

    public void setMserialnum(String mserialnum) {
        this.mserialnum = mserialnum;
    }

    public String getMlocale() {
        return mlocale;
    }

    public void setMlocale(String mlocale) {
        this.mlocale = mlocale;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (mplatform != null ? mplatform.hashCode() : 0);
        hash += (magent != null ? magent.hashCode() : 0);
        hash += (mserialnum != null ? mserialnum.hashCode() : 0);
        hash += (mlocale != null ? mlocale.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NewsCatlogPlatformPK)) {
            return false;
        }
        NewsCatlogPlatformPK other = (NewsCatlogPlatformPK) object;
        if ((this.mplatform == null && other.mplatform != null) || (this.mplatform != null && !this.mplatform.equals(other.mplatform))) {
            return false;
        }
        if ((this.magent == null && other.magent != null) || (this.magent != null && !this.magent.equals(other.magent))) {
            return false;
        }
        if ((this.mserialnum == null && other.mserialnum != null) || (this.mserialnum != null && !this.mserialnum.equals(other.mserialnum))) {
            return false;
        }
        if ((this.mlocale == null && other.mlocale != null) || (this.mlocale != null && !this.mlocale.equals(other.mlocale))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.NewsCatlogPlatformPK[mplatform=" + mplatform + ", magent=" + magent + ", mserialnum=" + mserialnum + ", mlocale=" + mlocale + "]";
    }

}
